package com.yuw.oop.abstractdemo;

public class Rectangle extends Shap {

	// 属性
	private double width;
	private double heigth;

	// 行为
	@Override
	public double calculateShapeArea() {
		// 计算面积
		double aera = width * heigth;
		return aera;
	}

	@Override
	public double calculateShapeLength() {
		// 计算周长
		double len = 2 * (width + heigth);
		return len;
	}

	public Rectangle(double width, double heigth) {
		super();
		this.width = width;
		this.heigth = heigth;
	}

	public Rectangle() {

	}

	public double getWidth() {
		return width;
	}

	public void setWidth(double width) {
		this.width = width;
	}

	public double getHeigth() {
		return heigth;
	}

	public void setHeigth(double heigth) {
		this.heigth = heigth;
	}

}
